package org.obs.controller;

import java.io.Serializable;

/**
 * Objects "ElementData" send to server as input from server
 * and returns as reply
 * @author victor
 *
 */
public class ElementData implements Serializable {

	private static final long serialVersionUID = 1L;

	private String attribute;
	
	private String data;
	
	private ELEMENT_STATUS status = ELEMENT_STATUS.CHECK_ME;

	public String getAttribute() {
		return attribute;
	}

	public void setAttribute(String attribute) {
		this.attribute = attribute;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	public ELEMENT_STATUS getStatus() {
		return status;
	}

	public void setStatus(ELEMENT_STATUS status) {
		this.status = status;
	}
	
	public void ok() {
		setData(null);
		setStatus(ELEMENT_STATUS.CHECKED_OK);
	}
	
	public void error(String errorString) {
		setData(errorString);
		setStatus(ELEMENT_STATUS.CHECKED_ERROR);
	}
}
